package org.springframework.nio.handler;

import java.lang.reflect.Method;

import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.nio.annotation.Handler;
import org.springframework.nio.method.HandlerInfo;

public class DefaultHandlerMapping extends AbstractHanlderMapping<HandlerInfo>{


	@Override
	protected HandlerInfo getMappingForMethod(Method method, Class handlerType) {
		Handler handler = AnnotationUtils.findAnnotation(method, Handler.class);
		HandlerInfo info = null;
		if(handler != null){
			info = new HandlerInfo(handler);
		}
		return info;
	}


}
